#pragma once

namespace RegLibCPP {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	public ref class EditMultiString : public System::Windows::Forms::Form
	{
	public:
		EditMultiString(String^ valueName, array<String^>^ editValue)
		{
			InitializeComponent();
			textBoxRegValue->Text = valueName;
			textBoxString->Clear();
			for each (String^item in editValue)
			{
				textBoxString->Text += item + "\r\n";
				
			}

			textBoxString->Select();



		}

	protected:
		~EditMultiString()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::TextBox^  textBoxRegValue;
	private: System::Windows::Forms::Label^  labelValue;
	private: System::Windows::Forms::TextBox^  textBoxString;
	protected:


	private: System::Windows::Forms::Button^  buttonCancel;
	private: System::Windows::Forms::Button^  buttonOK;



	private:
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		void InitializeComponent(void)
		{
			this->textBoxRegValue = (gcnew System::Windows::Forms::TextBox());
			this->labelValue = (gcnew System::Windows::Forms::Label());
			this->textBoxString = (gcnew System::Windows::Forms::TextBox());
			this->buttonCancel = (gcnew System::Windows::Forms::Button());
			this->buttonOK = (gcnew System::Windows::Forms::Button());
			this->SuspendLayout();
			// 
			// textBoxRegValue
			// 
			this->textBoxRegValue->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left)
				| System::Windows::Forms::AnchorStyles::Right));
			this->textBoxRegValue->BorderStyle = System::Windows::Forms::BorderStyle::None;
			this->textBoxRegValue->Location = System::Drawing::Point(78, 17);
			this->textBoxRegValue->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
			this->textBoxRegValue->Name = L"textBoxRegValue";
			this->textBoxRegValue->ReadOnly = true;
			this->textBoxRegValue->Size = System::Drawing::Size(318, 19);
			this->textBoxRegValue->TabIndex = 12;
			this->textBoxRegValue->Text = L"Text...";
			// 
			// labelValue
			// 
			this->labelValue->AutoSize = true;
			this->labelValue->Location = System::Drawing::Point(10, 17);
			this->labelValue->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
			this->labelValue->Name = L"labelValue";
			this->labelValue->Size = System::Drawing::Size(60, 20);
			this->labelValue->TabIndex = 11;
			this->labelValue->Text = L"Value :";
			// 
			// textBoxString
			// 
			this->textBoxString->Location = System::Drawing::Point(13, 47);
			this->textBoxString->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
			this->textBoxString->Multiline = true;
			this->textBoxString->Name = L"textBoxString";
			this->textBoxString->Size = System::Drawing::Size(383, 126);
			this->textBoxString->TabIndex = 14;
			// 
			// buttonCancel
			// 
			this->buttonCancel->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left));
			this->buttonCancel->DialogResult = System::Windows::Forms::DialogResult::Cancel;
			this->buttonCancel->Location = System::Drawing::Point(13, 182);
			this->buttonCancel->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
			this->buttonCancel->Name = L"buttonCancel";
			this->buttonCancel->Size = System::Drawing::Size(112, 35);
			this->buttonCancel->TabIndex = 15;
			this->buttonCancel->Text = L"&Cancel";
			this->buttonCancel->UseVisualStyleBackColor = true;
			// 
			// buttonOK
			// 
			this->buttonOK->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Right));
			this->buttonOK->Location = System::Drawing::Point(284, 183);
			this->buttonOK->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
			this->buttonOK->Name = L"buttonOK";
			this->buttonOK->Size = System::Drawing::Size(112, 35);
			this->buttonOK->TabIndex = 16;
			this->buttonOK->Text = L"&Ok";
			this->buttonOK->UseVisualStyleBackColor = true;
			this->buttonOK->Click += gcnew System::EventHandler(this, &EditMultiString::buttonOK_Click);
			// 
			// EditMultiString
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(9, 20);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->CancelButton = this->buttonCancel;
			this->ClientSize = System::Drawing::Size(409, 231);
			this->Controls->Add(this->buttonCancel);
			this->Controls->Add(this->buttonOK);
			this->Controls->Add(this->textBoxRegValue);
			this->Controls->Add(this->labelValue);
			this->Controls->Add(this->textBoxString);
			this->Font = (gcnew System::Drawing::Font(L"Century Gothic", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
				static_cast<System::Byte>(0)));
			this->Margin = System::Windows::Forms::Padding(4, 5, 4, 5);
			this->MaximizeBox = false;
			this->MaximumSize = System::Drawing::Size(425, 270);
			this->MinimizeBox = false;
			this->MinimumSize = System::Drawing::Size(425, 270);
			this->Name = L"EditMultiString";
			this->ShowIcon = false;
			this->ShowInTaskbar = false;
			this->SizeGripStyle = System::Windows::Forms::SizeGripStyle::Hide;
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
			this->Text = L"Edit";
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion

		public: System::String^ GetTextstring(){
			return textBoxString->Text;
		}

	private: System::Void buttonOK_Click(System::Object^  sender, System::EventArgs^  e) {
		this->Close();
		this->DialogResult = System::Windows::Forms::DialogResult::OK;

	}
};
}
